package com.red.star.wechat.data.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * @ProjectName: macalline-data-server$
 * @Package: com.red.star.macalline.data.entity$
 * @Description: 券包组实体
 * @Author: xuquanyu
 * @CreateDate: 2018/9/7$ 下午18:19$
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "CouponPackage", description = "券包组实体")
@Table(name = "t_package_coupon")
public class CouponPackage extends BaseEntity {
    /**
     * 卷名称
     */
    @ApiModelProperty(value = "卷名称")
    private String name;

    /**
     * 商场code
     */
    @ApiModelProperty(value = "商场code")
    private String mallCode;

    /**
     * 商场名称
     */
    @Transient
    @ApiModelProperty(value = "商场名称")
    private String mallName;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 状态 : 0 启用 ,1停用
     */
    @ApiModelProperty(value = "状态 :0 启用 ,1停用", example = "0")
    private Integer status;

    /**
     * 状态 : 0 未删除 ,1已删除
     */
    @ApiModelProperty(value = "状态 :0 未删除 ,1已删除", example = "0")
    private Integer isDelete;

    /**
     * 错误的券包ID
     */
    @Transient
    private String errCoupons;

    /**
     * remark: 0 空 ,1 开始日期须小于结束日期 ,2 已领券不能再修改
     */
    @Transient
    private Integer remark;

    /**
     *
     */
    @Transient
    private Boolean result;

    @Transient
    private CouponPackageRelation couponPackageRelation;

    @Transient
    private List<CouponPackageRelation> couponPackageRelationList;


    @Transient
    @ApiModelProperty(value = "券包id组")
    private String []  coupons;

    /**
     * 兑换数量
     */
    @Transient
    @ApiModelProperty(value = "兑换数量")
    private String []  counts;

}
